<?php

function brandImageOriginal($image_name = '') {
    $content=preg_match_all("/src[=\"(\'\s]+([^\"\']+)[\"\)']/i", $content,$match);
    foreach ($match[0] as $key => $value) {
        $v=substr($value,5,-1);
        $ch = curl_init();
        $timeout = 10;
        curl_setopt ($ch, CURLOPT_URL, $v);
        curl_setopt ($ch, CURLOPT_HEADER, 1);
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
        $contents = curl_exec($ch);
        if (!preg_match("/200 OK/", $contents)){
           return false;
        }else{
            return 1;
        }
    }
    $brand_pic=str_replace('_small','',$image_name);
    $brand_pic=str_replace('_sm','',$brand_pic);

    

    return $brand_pic;
}


/**
 *给图片增加前缀，使图片显示出来
 * @param  string $content
 * @author 老司机 <wutongtai@wttai.com>
 */
function deal_content_img($content)
{
     //return $content;
   
    
    return $content;
     
}